package org.example.stock;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 库存服务接口
 * name:指定调用rest接口所对应的服务名
 * path:指定调用rest接口所在的StockController指定的@RequestMapping
 */

@FeignClient(name = "stock-service",path = "/stock")
public interface StockOpenFeignService {
    //声明需要调用的rest接口对应的方法
    /**
     * 库存扣减
     * @return
     */
    @GetMapping("/delete{id}")
    String deleteStock(@PathVariable("id") String id);

}
